<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<title>Identifier - cppreference.com</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../../../common/favicon.ico">
<link rel="stylesheet" href="../../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-css:7:472787eddcf4605d11de8c7ef047234f */</style>

<script src="../../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"c/language/identifier","wgTitle":"c/language/identifier","wgCurRevisionId":139745,"wgArticleId":13883,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"c/language/identifier","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-ColiruCompiler":1,"gadget-MathJax":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-js:7:9f05c6caceb9bb1a482b6cebd4c5a330 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<style type="text/css">/*<![CDATA[*/
.source-c {line-height: normal;}
.source-c li, .source-c pre {
	line-height: normal; border: 0px none white;
}
/**
 * GeSHi Dynamically Generated Stylesheet
 * --------------------------------------
 * Dynamically generated stylesheet for c
 * CSS class: source-c, CSS id: 
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 * --------------------------------------
 */
.c.source-c .de1, .c.source-c .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.c.source-c  {font-family:monospace;}
.c.source-c .imp {font-weight: bold; color: red;}
.c.source-c li, .c.source-c .li1 {font-weight: normal; vertical-align:top;}
.c.source-c .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.c.source-c .li2 {font-weight: bold; vertical-align:top;}
.c.source-c .kw1 {color: #0000dd;}
.c.source-c .kw2 {color: #0000ff;}
.c.source-c .kw3 {color: #0000dd;}
.c.source-c .kw4 {color: #0000ff;}
.c.source-c .co1 {color: #909090;}
.c.source-c .co2 {color: #339900;}
.c.source-c .coMULTI {color: #ff0000; font-style: italic;}
.c.source-c .es0 {color: #008000; font-weight: bold;}
.c.source-c .es1 {color: #008000; font-weight: bold;}
.c.source-c .es2 {color: #008000; font-weight: bold;}
.c.source-c .es3 {color: #008000; font-weight: bold;}
.c.source-c .es4 {color: #008000; font-weight: bold;}
.c.source-c .es5 {color: #008000; font-weight: bold;}
.c.source-c .br0 {color: #008000;}
.c.source-c .sy0 {color: #008000;}
.c.source-c .sy1 {color: #000080;}
.c.source-c .sy2 {color: #000040;}
.c.source-c .sy3 {color: #000040;}
.c.source-c .sy4 {color: #008080;}
.c.source-c .st0 {color: #008000;}
.c.source-c .nu0 {color: #000080;}
.c.source-c .nu6 {color:#000080;}
.c.source-c .nu8 {color:#000080;}
.c.source-c .nu12 {color:#000080;}
.c.source-c .nu16 {color:#000080;}
.c.source-c .nu17 {color:#000080;}
.c.source-c .nu18 {color:#000080;}
.c.source-c .nu19 {color:#000080;}
.c.source-c .ln-xtra, .c.source-c li.ln-xtra, .c.source-c div.ln-xtra {background-color: #ffc;}
.c.source-c span.xtra { display:block; }

/*]]>*/
</style><!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-c_language_identifier skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
<div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading">Identifier</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">From cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../../c.html" title="c">c</a>‎ | <a href="../language.html" title="c/language">language</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="t-navbar" style=""><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../../c.html" title="c"> C</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em;">
<tr class="t-nv"><td colspan="5"> <a href="../language.html" title="c/language"> Language</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../header.html" title="c/header"> Headers</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../types.html" title="c/types"> Type support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../program.html" title="c/program"> Program utilities</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../variadic.html" title="c/variadic"> Variadic function support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../error.html" title="c/error"> Error handling</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../memory.html" title="c/memory"> Dynamic memory management</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../string.html" title="c/string"> Strings library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../algorithm.html" title="c/algorithm"> Algorithms</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../numeric.html" title="c/numeric"> Numerics</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../chrono.html" title="c/chrono"> Date and time utilities</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../io.html" title="c/io"> Input/output support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../locale.html" title="c/locale"> Localization support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../thread.html" title="c/thread"> Concurrency support</a> <span class="t-mark-rev t-since-c11">(C11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../experimental.html" title="c/experimental"> Technical Specifications</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../index.html" title="c/symbol index"> Symbol index</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../language.html" title="c/language"> C language</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="basic_concepts.html" title="c/language/basic concepts">Basic concepts</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../keyword.html" title="c/keyword"> Keywords</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../preprocessor.html" title="c/preprocessor"> Preprocessor</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="statements.html" title="c/language/statements"> Statements</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="expressions.html" title="c/language/expressions"> Expressions</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="initialization.html" title="c/language/initialization"> Initialization</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="declarations.html" title="c/language/declarations"> Declarations</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="functions.html" title="c/language/functions"> Functions</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> Miscellaneous</td></tr>
<tr class="t-nv"><td colspan="5"> <a href="history.html" title="c/language/history"> History of C</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../experimental.html" title="c/experimental">Technical Specifications</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="basic_concepts.html" title="c/language/basic concepts"> Basic Concepts</a><div class="t-navbar-menu"><div><div style="display:inline-block">
<div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="../comment.html" title="c/comment"> Comments</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="ascii.html" title="c/language/ascii"> ASCII</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="translation_phases.html" title="c/language/translation phases"> Translation phases</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="punctuators.html" title="c/language/punctuators">Punctuation</a></td></tr>
<tr class="t-nv"><td colspan="5"> <strong class="selflink">Identifier</strong></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="scope.html" title="c/language/scope">Scope</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="lifetime.html" title="c/language/lifetime">Lifetime</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="name_space.html" title="c/language/name space">Lookup and name spaces</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="compatible_type.html" title="c/language/type">Type</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="arithmetic_types.html" title="c/language/arithmetic types">Arithmetic types</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="object.html" title="c/language/object">Objects and alignment</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="main_function.html" title="c/language/main function">The main() function</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="as_if.html" title="c/language/as if">The as-if rule</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="behavior.html" title="c/language/behavior">Undefined behavior</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="memory_model.html" title="c/language/memory model">Memory model and data races</a></td></tr>
</table></div>
</div><div></div></div></div></div><div class="t-navbar-sep"> </div></div>
<p>An <i>identifier</i> is an arbitrarily long sequence of digits, underscores, lowercase and uppercase Latin letters<span class="t-rev-inl t-since-c99"><span>, and Unicode characters specified using <code>\u</code> and <code>\U</code> <a href="escape.html" title="c/language/escape">escape</a> notation</span> <span><span class="t-mark-rev t-since-c99">(since C99)</span></span></span>. A valid identifier must begin with a non-digit character (Latin letter, underscore<span class="t-rev-inl t-since-c99"><span>, or Unicode non-digit character</span> <span><span class="t-mark-rev t-since-c99">(since C99)</span></span></span>). Identifiers are case-sensitive (lowercase and uppercase letters are distinct).
</p>
 <table class="t-rev-begin">
<tr class="t-rev t-since-c99"><td>
<p>It is implementation-defined if raw (not escaped) Unicode characters are allowed in identifiers:
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="kw4">char</span> <span class="sy2">*</span>\U0001f431 <span class="sy1">=</span> <span class="st0">"cat"</span><span class="sy4">;</span> <span class="co1">// supported</span>
<span class="kw4">char</span> <span class="sy2">*</span>🐱 <span class="sy1">=</span> <span class="st0">"cat"</span><span class="sy4">;</span> <span class="co1">// implementation-defined</span>
                  <span class="co1">// (e.g. works with Clang, but not GCC prior to version 10)</span></pre></div></div>
</td>
<td><span class="t-mark-rev t-since-c99">(since C99)</span></td></tr>
</table>
<p>Identifiers can denote the following types of entities:
</p>
<ul><li> <a href="object.html" title="c/language/object">objects</a>
</li><li> <a href="functions.html" title="c/language/functions">functions</a>
</li><li> tags (<a href="struct.html" title="c/language/struct">struct</a>, <a href="union.html" title="c/language/union">union</a>, or <a href="enum.html" title="c/language/enum">enumerations</a>)
</li><li> structure or union members
</li><li> enumeration constants
</li><li> <a href="typedef.html" title="c/language/typedef">typedef</a> names
</li><li> <a href="statements.html#Labels" title="c/language/statements">label</a> names
</li><li> <a href="../preprocessor/replace.html" title="c/preprocessor/replace">macro</a> names
</li><li> <a href="../preprocessor/replace.html" title="c/preprocessor/replace">macro parameter</a> names
</li></ul>
<p>Every identifier other than macro names or macro parameter names has <a href="scope.html" title="c/language/scope">scope</a>, belongs to a <a href="name_space.html" title="c/language/name space">name space</a>, and may have <a href="storage_duration.html" title="c/language/storage duration">linkage</a>. The same identifier can denote different entities at different points in the program, or may denote different entities at the same point if the entities are in different name spaces.
</p>
<h3><span class="mw-headline" id="Reserved_identifiers">Reserved identifiers</span></h3>
<p>The following identifiers are <i>reserved</i> and may not be declared in a program (doing so invokes undefined behavior):
</p>
<ol>
<li>The identifiers that are <a href="../keyword.html" title="c/keyword">keywords</a> cannot be used for other purposes. In particular #define or #undef of an identifier that is identical to a keyword is not allowed.</li>
<li>All external identifiers that begin with an underscore.</li>
<li>All identifiers that begin with an underscore followed by a capital letter or by another underscore (these reserved identifiers allow the library to use numerous behind-the-scenes non-external macros and functions).</li>
<li>All external identifiers defined by the standard library (in hosted environment). This means that no user-supplied external names are allowed to match any library names, not even if declaring a function that is identical to a library function.</li>
<li>Identifiers declared as reserved for the implementation or future use by the standard library (see below).</li>
<li class="t-rev-inl t-rev-inl-noborder t-since-c23"><span>Identifiers declared as potentially reserved and provided by the implementation (see below).</span> <span class="t-mark-rev t-since-c23">(since C23)</span></li>
</ol> 
<p>All other identifiers are available. Identifiers that are not reserved <span class="t-rev-inl t-since-c23"><span>or potentially reserved</span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span> can be used with no fear of unexpected collisions when moving programs from one compiler and library to another.
</p><p>Note: in C++, identifiers with a double underscore anywhere are reserved everywhere; in C, only the ones that begin with a double underscore are reserved.
</p>
<h4><span class="mw-headline" id="Reserved_and_potentially_reserved_identifiers_in_the_library">Reserved and potentially reserved identifiers in the library</span></h4>
<p>The standard library reserves every identifiers it provides. Reserved identifiers that have <a href="storage_duration.html" title="c/language/storage duration">external linkage</a> (e.g. name of every standard function) are reserved regardless which header is included. Other reserved identifiers are reserved when any of its associated headers is included.
</p>
 <table class="t-rev-begin">
<tr class="t-rev t-since-c23"><td>
<p>Potentially reserved identifiers are intended to be used by the implementation and future revision of standard. If a potentially reserved identifier is provided by the implementation, it becomes reserved.
</p><p>Implementations are only allowed to provide <a href="extern.html" title="c/language/extern">external definitions</a> of potentially reserved identifiers that are reserved as function names.
</p><p>Potentially reserved identifiers that are not provided by the implementation are not reserved. They can be declared or defined by the user without undefined behavior. However, such usage is not portable.
</p>
</td>
<td><span class="t-mark-rev t-since-c23">(since C23)</span></td></tr>
</table>
<p>Following identifiers are reserved <span class="t-rev-inl t-since-c23"><span>or potentially reserved</span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span> for the implementation or future use by the standard library.
</p>
<ul>
<li><i>function names</i><span class="t-rev-inl t-since-c23"><span>, all of which are potentially reserved</span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span>
  <ul>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c99"><span><code>cerf</code>, <code>cerfc</code>, <code>cexp2</code>, <code>cexpm1</code>, <code>clog10</code>, <code>clog1p</code>, <code>clog2</code>, <code>clgamma</code>, <code>ctgamma</code><span class="t-rev-inl t-since-c23"><span>, <code>csinpi</code>, <code>ccospi</code>, <code>ctanpi</code>, <code>casinpi</code>, <code>cacospi</code>, <code>catanpi</code>, <code>ccompoundn</code>, <code>cpown</code>, <code>cpowr</code>, <code>crootn</code>, <code>crsqrt</code>, <code>cexp10m1</code>, <code>cexp10</code>, <code>cexp2m1</code>, <code>clog10p1</code>, <code>clog2p1</code>, <code>clogp1</code></span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span> and their -f and -l suffixed variants, in <a href="../numeric/complex.html" title="c/numeric/complex"><tt>&lt;complex.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c99">(since C99)</span></li>
  <li>beginning with <code>is</code> or <code>to</code> followed by a lowercase letter, in <a href="../string/byte.html" title="c/string/byte"><tt>&lt;ctype.h&gt;</tt></a><span class="t-rev-inl t-since-c95"><span> and <a href="../string/wide.html" title="c/string/wide"><tt>&lt;wctype.h&gt;</tt></a></span> <span><span class="t-mark-rev t-since-c95">(since C95)</span></span></span></li>
  <li>beginning with <code>str</code> <span class="t-rev-inl t-since-c23"><span>or <code>wcs</code></span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span> followed by a lowercase letter, in <a href="../string/byte.html" title="c/string/byte"><tt>&lt;stdlib.h&gt;</tt></a> <span class="t-rev-inl t-since-c23"><span>and <a href="../types/integer.html" title="c/types/integer"><tt>&lt;inttypes.h&gt;</tt></a></span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c23"><span>beginning with <code>cr_</code>, in <a href="../numeric/math.html" title="c/numeric/math"><tt>&lt;math.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c23">(since C23)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c95"><span>beginning with <code>wcs</code> followed by a lowercase letter, in <a href="../string/wide.html" title="c/string/wide"><tt>&lt;wchar.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c95">(since C95)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c11"><span>beginning with <code>atomic_</code> followed by a lowercase letter, in <a href="../thread.html" title="c/thread"><tt>&lt;stdatomic.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c11">(since C11)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c11"><span>beginning with <code>cnd_</code>, <code>mtx_</code>, <code>thrd_</code> or <code>tss_</code> followed by a lowercase letter, in <a href="../thread.html" title="c/thread"><tt>&lt;threads.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c11">(since C11)</span></li>
  </ul>
</li>
<li><i>typedef names</i><span class="t-rev-inl t-since-c23"><span>, all of which are potentially reserved</span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span>
  <ul>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c99"><span>beginning with <code>int</code> or <code>uint</code> and ending with <code>_t</code>, in <a href="../types/integer.html" title="c/types/integer"><tt>&lt;stdint.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c99">(since C99)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c11"><span>beginning with <code>atomic_</code> or <code>memory_</code> followed by a lowercase letter, in <a href="../thread.html" title="c/thread"><tt>&lt;stdatomic.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c11">(since C11)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c11"><span>beginning with <code>cnd_</code>, <code>mtx_</code>, <code>thrd_</code> or <code>tss_</code> followed by a lowercase letter, in <a href="../thread.html" title="c/thread"><tt>&lt;threads.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c11">(since C11)</span></li>
  </ul>
</li>
<li><i>macro names</i>
  <ul>
  <li>beginning with <code>E</code> followed by a digit or an uppercase letter, in <a href="../error/errno_macros.html" title="c/error/errno macros"><tt>&lt;errno.h&gt;</tt></a></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c99"><span>beginning with <code>FE_</code> followed by an uppercase letter, in <a href="../numeric/fenv.html" title="c/numeric/fenv"><tt>&lt;fenv.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c99">(since C99)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c23"><span>beginning with <code>DBL_</code>, <code>DEC32_</code>, <code>DEC64_</code>, <code>DEC128_</code>, <code>DEC_</code>, <code>FLT_</code>, or <code>LDBL_</code> followed by an uppercase letter, in <a href="../types/limits.html" title="c/types/limits"><tt>&lt;float.h&gt;</tt></a>; these identifiers are potentially reserved</span> <span class="t-mark-rev t-since-c23">(since C23)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c99"><span>beginning with <code>INT</code> or <code>UINT</code> and ending with <code>_MAX</code>, <code>_MIN</code><span class="t-rev-inl t-since-c23"><span>, <code>_WIDTH</code></span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span>, or <code>_C</code>, in <a href="../types/integer.html" title="c/types/integer"><tt>&lt;stdint.h&gt;</tt></a><span class="t-rev-inl t-since-c23"><span>; these identifiers are potentially reserved</span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span></span> <span class="t-mark-rev t-since-c99">(since C99)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c99"><span>beginning with <code>PRI</code> or <code>SCN</code> followed by lowercase letter or the letter <code>X</code>, in <a href="../types/integer.html" title="c/types/integer"><tt>&lt;inttypes.h&gt;</tt></a><span class="t-rev-inl t-since-c23"><span>; these identifiers are potentially reserved</span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span></span> <span class="t-mark-rev t-since-c99">(since C99)</span></li>
  <li>beginning with <code>LC_</code> followed by an uppercase letter, in <a href="../locale/LC_categories.html" title="c/locale/LC categories"><tt>&lt;locale.h&gt;</tt></a></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c23"><span>beginning with <code>FP_</code> followed by an uppercase letter, in <a href="../numeric/math.html" title="c/numeric/math"><tt>&lt;math.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c23">(since C23)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c23"><span>beginning with <code>MATH_</code> followed by an uppercase letter, in <a href="../numeric/math.html" title="c/numeric/math"><tt>&lt;math.h&gt;</tt></a>; these identifiers are potentially reserved</span> <span class="t-mark-rev t-since-c23">(since C23)</span></li>
  <li>beginning with <code>SIG</code> or <code>SIG_</code> followed by an uppercase letter, in <a href="../program.html" title="c/program"><tt>&lt;signal.h&gt;</tt></a></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c11"><span>beginning with <code>TIME_</code> followed by an uppercase letter, in <a href="../chrono/timespec_get.html" title="c/chrono/timespec get"><tt>&lt;time.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c11">(since C11)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c11"><span>beginning with <code>ATOMIC_</code> followed by an uppercase letter, in <a href="../thread.html" title="c/thread"><tt>&lt;stdatomic.h&gt;</tt></a><span class="t-rev-inl t-since-c23"><span>; these identifiers are potentially reserved</span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span></span> <span class="t-mark-rev t-since-c11">(since C11)</span></li>
  </ul>
</li>
<li><i>enumeration constants</i><span class="t-rev-inl t-since-c23"><span>, all of which are potentially reserved</span> <span><span class="t-mark-rev t-since-c23">(since C23)</span></span></span>
  <ul>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c11"><span>beginning with <code>memory_order_</code> followed by a lowercase letter, in <a href="../thread.html" title="c/thread"><tt>&lt;stdatomic.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c11">(since C11)</span></li>
  <li class="t-rev-inl t-rev-inl-noborder t-since-c11"><span>beginning with <code>cnd_</code>, <code>mtx_</code>, <code>thrd_</code> or <code>tss_</code> followed by a lowercase letter, in <a href="../thread.html" title="c/thread"><tt>&lt;threads.h&gt;</tt></a></span> <span class="t-mark-rev t-since-c11">(since C11)</span></li>
  </ul>
</li>
</ul>
 <table class="t-rev-begin">
<tr class="t-rev t-since-c23"><td>
<p>Implementations are recommended to warn when on declaration or definition of potentially reserved identifiers, except when
</p>
<ul><li> the declaration is a non-definition declaration of an identifier with external linkage provided by the implementation, and
</li><li> the type used in the declaration is <a href="types.html#Compatible_types" title="c/language/types" class="mw-redirect">compatible</a> with that used in the definition.
</li></ul>
</td>
<td><span class="t-mark-rev t-since-c23">(since C23)</span></td></tr>
</table>
<h3><span class="mw-headline" id="Translation_limits">Translation limits</span></h3>
<p>Even though there is no specific limit on the length of identifiers, early compilers had limits on the number of significant initial characters in identifiers and the linkers imposed stricter limits on the names with <a href="storage_duration.html" title="c/language/storage duration">external linkage</a>. C requires that at least the following limits are supported by any standard-compliant implementation:
</p>
 <table class="t-rev-begin">
<tr class="t-rev t-until-c99"><td>
<ul><li>31 significant initial characters in an internal identifier or a macro name
</li><li>6 significant initial characters in an external identifier
</li><li>511 external identifiers in one translation unit
</li><li>127 identifiers with block scope declared in one block
</li><li>1024 macro identifiers simultaneously defined in one preprocessing translation unit
</li></ul>
</td>
<td><span class="t-mark-rev t-until-c99">(until C99)</span></td></tr>
<tr class="t-rev t-since-c99"><td>
<ul><li>63 significant initial characters in an internal identifier or a macro name
</li><li>31 significant initial characters in an external identifier
</li><li>4095 external identifiers in one translation unit
</li><li>511 identifiers with block scope declared in one block
</li><li>4095 macro identifiers simultaneously defined in one preprocessing translation unit
</li></ul>
</td>
<td><span class="t-mark-rev t-since-c99">(since C99)</span></td></tr>
</table>
<h3><span class="mw-headline" id="References">References</span></h3>
<div class="t-ref-std-17">
<ul><li> C17 standard (ISO/IEC 9899:2018): 
</li></ul>
<dl><dd><ul><li> 5.2.4.1 Translation limits (p: 19-20)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.4.2 Identifiers (p: 43)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.10.8 Predefined macro names (p: 127-129)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.11.9 Predefined macro names (p: 130)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 7.31 Future library directions (p: 332-333)
</li></ul>
</dd></dl>
<dl><dd><ul><li> K.3.1.2 Reserved identifiers (p: 425)
</li></ul>
</dd></dl>
</div>
<div class="t-ref-std-11">
<ul><li> C11 standard (ISO/IEC 9899:2011): 
</li></ul>
<dl><dd><ul><li> 5.2.4.1 Translation limits (p: 25-26)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.4.2 Identifiers (p: 59-60)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.10.8 Predefined macro names (p: 175-176)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.11.9 Predefined macro names (p: 179)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 7.31 Future library directions (p: 455-457)
</li></ul>
</dd></dl>
<dl><dd><ul><li> K.3.1.2 Reserved identifiers (p: 584)
</li></ul>
</dd></dl>
</div>
<div class="t-ref-std-c99">
<ul><li> C99 standard (ISO/IEC 9899:1999): 
</li></ul>
<dl><dd><ul><li> 5.2.4.1 Translation limits (p: 20-21)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.4.2 Identifiers (p: 51-52)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.10.8 Predefined macro names (p: 160-161)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.11.9 Predefined macro names (p: 163)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 7.26 Future library directions (p: 401-402)
</li></ul>
</dd></dl>
</div>
<div class="t-ref-std-c89">
<ul><li> C89/C90 standard (ISO/IEC 9899:1990): 
</li></ul>
<dl><dd><ul><li> 2.2.4.1 Translation limits 
</li></ul>
</dd></dl>
<dl><dd><ul><li> 3.1.2 Identifiers 
</li></ul>
</dd></dl>
<dl><dd><ul><li> 3.8.8 Predefined macro names 
</li></ul>
</dd></dl>
</div>
<h3><span class="mw-headline" id="See_also">See also</span></h3>
<table class="t-dsc-begin">

</table>

<!-- 
NewPP limit report
Preprocessor visited node count: 3207/1000000
Preprocessor generated node count: 8483/1000000
Post‐expand include size: 49048/2097152 bytes
Template argument size: 11156/2097152 bytes
Highest expansion depth: 13/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_en_:pcache:idhash:13883-0!*!0!!en!*!* and timestamp 20220605012758 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    Retrieved from "<a href="https://en.cppreference.com/mwiki/index.php?title=c/language/identifier&amp;oldid=139745">https://en.cppreference.com/mwiki/index.php?title=c/language/identifier&amp;oldid=139745</a>"                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer">
                        <div id="cpp-navigation">
            <h5>Navigation</h5>
            <ul><li><a href="https://en.cppreference.com/w/c/language/identifier">Online version</a></li><li>Offline version retrieved 2022-07-30 14:05.</li></ul></div>
                        <ul id="footer-info">
                                    <li id="footer-info-lastmod"> This page was last modified on 18 May 2022, at 21:58.</li>
                                    <li id="footer-info-viewcount">This page has been accessed 53,134 times.</li>
                            </ul>
                    </div>
        </div>
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.ColiruCompiler","ext.gadget.MathJax"], null, true);
}</script>
<script src="../../../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 0.341 secs. -->
	</body>
<!-- Cached 20220605012758 -->
</html>